import request from '@/utils/request'

// 查询英雄列表
export function listHero(query) {
  return request({
    url: '/tile/hero/list',
    method: 'get',
    params: query
  })
}

// 查询英雄详细
export function getHero(heroId) {
  return request({
    url: '/tile/hero/' + heroId,
    method: 'get'
  })
}

// 新增英雄
export function addHero(data) {
  return request({
    url: '/tile/hero',
    method: 'post',
    data: data
  })
}

// 修改英雄
export function updateHero(data) {
  return request({
    url: '/tile/hero',
    method: 'put',
    data: data
  })
}

// 删除英雄
export function delHero(heroId) {
  return request({
    url: '/tile/hero/' + heroId,
    method: 'delete'
  })
}
